package com.study.builder.simple;

/**
 * 建造者模式
 * 强调创建的过程
 * 定制化创建过程 顺序不确定
 * StringBuilder SqlSessionFactoryBuilder
 *
 */
public class CourseBuilder {
    private Course course = new Course();

    public Course build(){
        return course;
    }

    public CourseBuilder addName(String name){
        course.setName(name);
        return this;
    }

    public CourseBuilder addVideo(String video){
        course.setVideo(video);
        return this;
    }

    public CourseBuilder addPpt(String ppt){
        course.setPpt(ppt);
        return this;
    }

    public CourseBuilder addNote(String note){
        course.setNote(note);
        return this;
    }
}
